﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace RioTinto.Web.Pages
{
    public partial class Error : NormalBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Exception exception = ErrorUtility.CurrentException;
            ErrorUtility.ClearError();

            if (exception != null)
            {
                BindError(exception);
            }
        }
        private void BindError(Exception exception)
        {
            m_ExceptionList.Items.Insert(0, new ListItem(exception.Message));
            if (exception.InnerException != null)
            {
                BindError(exception.InnerException);
            }
        }
    }
}
